/*import java.util.Scanner;

public class Test {
    public static void main4(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int a = 1;
        int b = 1;
        int tap = 0;
        for (int i = 0; i < n-2; i++) {
            tap = a+b;
            a = b;
            b = tap;
        }
        System.out.println(tap);
    }//不用递归的斐波那契数列
    public static int func(int n) {
        if(n > 2)
        {
            return func(n-1)+func(n-2);
        }
        if(n == 1 || n == 2)
        {
            return 1;
        }
        return -1;
    }
    public static void main3(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println(func(n));
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int sum = 1;
        for (int i = 1; i <= n; i++) {
            sum *= i;
        }
        System.out.println(sum);
    /阶乘
    public static void main2(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= n; j++) {
                if(i == j || i + j -1 == n )
                {
                    System.out.print("*");
                }else{
                    System.out.print(" ");
                }
            }
            System.out.println(" ");
        }//针对每行输入，输出用“*”组成的X形图案
    }
    public static void main1(String[] args) {
        int a = 0;
        int b = 0;
        int c = 1;
        double sum = 0;
        for (int i = 1; i <= 100; i++) {
            if(i % 2 != 0)
            {
                c = 1;
            }else {
                c = -1;
            }
            sum = sum + (double) c/i;
        }
        System.out.println(sum);
    }//计算1/1-1/2+1/3-1/4+1/5 …… + 1/99 - 1/100 的值
}
        */